package com.fk.regimen;

import com.fk.bean.Faq;
import com.fk.util.Net;
import com.lidroid.xutils.HttpUtils;
import com.lidroid.xutils.exception.HttpException;
import com.lidroid.xutils.http.RequestParams;
import com.lidroid.xutils.http.ResponseInfo;
import com.lidroid.xutils.http.callback.RequestCallBack;
import com.lidroid.xutils.http.client.HttpRequest.HttpMethod;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;



public class TiaoYangFragment extends Fragment implements OnClickListener{
	
	private Button btn_faqproblems;//突发嗓子痛按钮
	String tag = "china";
	

	public View onCreateView(LayoutInflater inflater,
			 ViewGroup container, Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		View tiaoYangLayout = inflater.inflate(R.layout.tiaoyang, container,false);
		
		btn_faqproblems = (Button) tiaoYangLayout.findViewById(R.id.btn_faqproblems);
		btn_faqproblems.setOnClickListener(this);
		
		return tiaoYangLayout;
	}

	
	@Override
	public void onClick(View v) {
		// 点击症状对应按钮
		switch (v.getId()) {
		case R.id.btn_faqproblems:

			//获取button上的症状名称
			String faq_name = btn_faqproblems.getText().toString();
			
			//跳转到症状详情页面
			Intent intent = new Intent(getActivity(),FaqdetailActivity.class);
			intent.putExtra("faq_name", faq_name);
			startActivity(intent);
			
			break;

		default:
			break;
		}
		
	}

}
